import lib.problem as problem

class Problem009(problem.Problem):
	def __init__(self):
		problem.Problem.__init__(self, 9)
		
	def solve(self):
		
		for c in range(1000):
			for b in range(c):
				for a in range(b):
					if a*a + b*b == c * c:
						if a + b +c == 1000:
							return a*b*c


if __name__ == "__main__":
	print(Problem009().solveAndTime())